Skip to content

Conversation

@kevinveenbirkenbach
Copy link

Like in issue #16 mentioned the following got optimized:

PHPDocs:

  • some @parameters are now declared
  • some @throws are now declared
  • some @returns contain now all possible return types
  • some @var use now absolute paths which can not be mapped by some IDE's e.g. (PHPStorm)

Logic:

  • Unnecessary logic got deleted

Variables:

  • $resultStatus is now deleted
  • $sendCount is now deleted

All tests are passed.

// Create mailjetClient
$mailjetClient = $this->createMailjetClient();

$this->createMailjetClient();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line has no effect at the moment. We create new client instance and throw it into space.

I suggest we move the creation of the client before the foreach loop and keep the is_null condition.

// Create mailjetClient
if (is_null($this->mailjetClient)) {
    $this->mailjetClient = $this->createMailjetClient();
}
foreach ($messages as $message) {
    // ...
}

This will have performance gain as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants